﻿using Application.AppService.HFAppService;
using AutoMapper;
using Domain;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.Human_resource_file_management_人力资源档案管理_.Human_resources_file_deletion_management_人力资源档案删除管理_
{
	public class HFDeleteController : Controller
	{
		private readonly IMapper mapper;
		private readonly IHFAppService hFAppService;

		public HFDeleteController(IMapper mapper, IHFAppService hFAppService)
		{
			this.mapper = mapper;
			this.hFAppService = hFAppService;
		}
		public IActionResult Index()
		{
			return View();
		}
		[HttpPost("FenYeHFDelete")]
		public IActionResult FenYeHFGJZ(int page, int pageSize, int zt1, int zt2)
		{
			HFFenYE hFFenYe = hFAppService.FenYeHFGJZZTAsync(page, pageSize, zt1, zt2, null);
			return Json(hFFenYe);
		}
		[HttpPost("DeleteHFAsync")]
		public async Task<IActionResult> DeleteHFAsync(int id)
		{
			bool rs =await hFAppService.DeleteHFAsync(id);
			return Json(rs);
		}

	}
}
